3.42 \(\int \frac {a+b \log (c (d+e x)^n)}{(f+g x)^3} \, dx\)

Optimal. Leaf size=112 \[ -\frac {a+b \log \left (c (d+e x)^n\right )}{2 g (f+g x)^2}+\frac {b e^2 n \log (d+e x)}{2 g (e f-d g)^2}-\frac {b e^2 n \log (f+g x)}{2 g (e f-d g)^2}+\frac {b e n}{2 g (f+g x) (e f-d g)} \]

[Out]

1/2*b*e*n/g/(-d*g+e*f)/(g*x+f)+1/2*b*e^2*n*ln(e*x+d)/g/(-d*g+e*f)^2+1/2*(-a-b*ln(c*(e*x+d)^n))/g/(g*x+f)^2-1/2
*b*e^2*n*ln(g*x+f)/g/(-d*g+e*f)^2

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2395, 44} \[ -\frac {a+b \log \left (c (d+e x)^n\right )}{2 g (f+g x)^2}+\frac {b e^2 n \log (d+e x)}{2 g (e f-d g)^2}-\frac {b e^2 n \log (f+g x)}{2 g (e f-d g)^2}+\frac {b e n}{2 g (f+g x) (e f-d g)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])/(f + g*x)^3,x]

[Out]

(b*e*n)/(2*g*(e*f - d*g)*(f + g*x)) + (b*e^2*n*Log[d + e*x])/(2*g*(e*f - d*g)^2) - (a + b*Log[c*(d + e*x)^n])/
(2*g*(f + g*x)^2) - (b*e^2*n*Log[f + g*x])/(2*g*(e*f - d*g)^2)

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^3} \, dx &=-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g (f+g x)^2}+\frac {(b e n) \int \frac {1}{(d+e x) (f+g x)^2} \, dx}{2 g}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g (f+g x)^2}+\frac {(b e n) \int \left (\frac {e^2}{(e f-d g)^2 (d+e x)}-\frac {g}{(e f-d g) (f+g x)^2}-\frac {e g}{(e f-d g)^2 (f+g x)}\right ) \, dx}{2 g}\\ &=\frac {b e n}{2 g (e f-d g) (f+g x)}+\frac {b e^2 n \log (d+e x)}{2 g (e f-d g)^2}-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g (f+g x)^2}-\frac {b e^2 n \log (f+g x)}{2 g (e f-d g)^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 83, normalized size = 0.74 \[ -\frac {a+b \log \left (c (d+e x)^n\right )-\frac {b e n (f+g x) (e (f+g x) \log (d+e x)-d g-e (f+g x) \log (f+g x)+e f)}{(e f-d g)^2}}{2 g (f+g x)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/(f + g*x)^3,x]

[Out]

-1/2*(a + b*Log[c*(d + e*x)^n] - (b*e*n*(f + g*x)*(e*f - d*g + e*(f + g*x)*Log[d + e*x] - e*(f + g*x)*Log[f +
g*x]))/(e*f - d*g)^2)/(g*(f + g*x)^2)

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 274, normalized size = 2.45 \[ -\frac {a e^{2} f^{2} - 2 \, a d e f g + a d^{2} g^{2} - {\left (b e^{2} f g - b d e g^{2}\right )} n x - {\left (b e^{2} f^{2} - b d e f g\right )} n - {\left (b e^{2} g^{2} n x^{2} + 2 \, b e^{2} f g n x + {\left (2 \, b d e f g - b d^{2} g^{2}\right )} n\right )} \log \left (e x + d\right ) + {\left (b e^{2} g^{2} n x^{2} + 2 \, b e^{2} f g n x + b e^{2} f^{2} n\right )} \log \left (g x + f\right ) + {\left (b e^{2} f^{2} - 2 \, b d e f g + b d^{2} g^{2}\right )} \log \relax (c)}{2 \, {\left (e^{2} f^{4} g - 2 \, d e f^{3} g^{2} + d^{2} f^{2} g^{3} + {\left (e^{2} f^{2} g^{3} - 2 \, d e f g^{4} + d^{2} g^{5}\right )} x^{2} + 2 \, {\left (e^{2} f^{3} g^{2} - 2 \, d e f^{2} g^{3} + d^{2} f g^{4}\right )} x\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^3,x, algorithm="fricas")

[Out]

-1/2*(a*e^2*f^2 - 2*a*d*e*f*g + a*d^2*g^2 - (b*e^2*f*g - b*d*e*g^2)*n*x - (b*e^2*f^2 - b*d*e*f*g)*n - (b*e^2*g
^2*n*x^2 + 2*b*e^2*f*g*n*x + (2*b*d*e*f*g - b*d^2*g^2)*n)*log(e*x + d) + (b*e^2*g^2*n*x^2 + 2*b*e^2*f*g*n*x +
b*e^2*f^2*n)*log(g*x + f) + (b*e^2*f^2 - 2*b*d*e*f*g + b*d^2*g^2)*log(c))/(e^2*f^4*g - 2*d*e*f^3*g^2 + d^2*f^2
*g^3 + (e^2*f^2*g^3 - 2*d*e*f*g^4 + d^2*g^5)*x^2 + 2*(e^2*f^3*g^2 - 2*d*e*f^2*g^3 + d^2*f*g^4)*x)

________________________________________________________________________________________

giac [B]  time = 0.25, size = 302, normalized size = 2.70 \[ -\frac {b g^{2} n x^{2} e^{2} \log \left (g x + f\right ) - b g^{2} n x^{2} e^{2} \log \left (x e + d\right ) + b d g^{2} n x e + 2 \, b f g n x e^{2} \log \left (g x + f\right ) + b d^{2} g^{2} n \log \left (x e + d\right ) - 2 \, b f g n x e^{2} \log \left (x e + d\right ) - 2 \, b d f g n e \log \left (x e + d\right ) - b f g n x e^{2} + b d f g n e + b f^{2} n e^{2} \log \left (g x + f\right ) + b d^{2} g^{2} \log \relax (c) - 2 \, b d f g e \log \relax (c) + a d^{2} g^{2} - b f^{2} n e^{2} - 2 \, a d f g e + b f^{2} e^{2} \log \relax (c) + a f^{2} e^{2}}{2 \, {\left (d^{2} g^{5} x^{2} - 2 \, d f g^{4} x^{2} e + 2 \, d^{2} f g^{4} x + f^{2} g^{3} x^{2} e^{2} - 4 \, d f^{2} g^{3} x e + d^{2} f^{2} g^{3} + 2 \, f^{3} g^{2} x e^{2} - 2 \, d f^{3} g^{2} e + f^{4} g e^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^3,x, algorithm="giac")

[Out]

-1/2*(b*g^2*n*x^2*e^2*log(g*x + f) - b*g^2*n*x^2*e^2*log(x*e + d) + b*d*g^2*n*x*e + 2*b*f*g*n*x*e^2*log(g*x +
f) + b*d^2*g^2*n*log(x*e + d) - 2*b*f*g*n*x*e^2*log(x*e + d) - 2*b*d*f*g*n*e*log(x*e + d) - b*f*g*n*x*e^2 + b*
d*f*g*n*e + b*f^2*n*e^2*log(g*x + f) + b*d^2*g^2*log(c) - 2*b*d*f*g*e*log(c) + a*d^2*g^2 - b*f^2*n*e^2 - 2*a*d
*f*g*e + b*f^2*e^2*log(c) + a*f^2*e^2)/(d^2*g^5*x^2 - 2*d*f*g^4*x^2*e + 2*d^2*f*g^4*x + f^2*g^3*x^2*e^2 - 4*d*
f^2*g^3*x*e + d^2*f^2*g^3 + 2*f^3*g^2*x*e^2 - 2*d*f^3*g^2*e + f^4*g*e^2)

________________________________________________________________________________________

maple [C]  time = 0.40, size = 633, normalized size = 5.65 \[ -\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{2 \left (g x +f \right )^{2} g}-\frac {2 a \,d^{2} g^{2}+2 b \,d^{2} g^{2} \ln \relax (c )+2 b \,e^{2} f^{2} \ln \relax (c )+2 b d e f g n +2 b d e \,g^{2} n x -2 b \,e^{2} f g n x +2 a \,e^{2} f^{2}-2 b \,e^{2} f^{2} n -4 a d e f g -i \pi b \,d^{2} g^{2} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b \,e^{2} f^{2} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+2 i \pi b d e f g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+i \pi b \,d^{2} g^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,d^{2} g^{2} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,e^{2} f^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,e^{2} f^{2} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+4 b \,e^{2} f g n x \ln \left (g x +f \right )-4 b \,e^{2} f g n x \ln \left (-e x -d \right )+2 b \,e^{2} f^{2} n \ln \left (g x +f \right )-2 b \,e^{2} f^{2} n \ln \left (-e x -d \right )-i \pi b \,e^{2} f^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+2 i \pi b d e f g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b \,d^{2} g^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-2 i \pi b d e f g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-2 i \pi b d e f g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+2 b \,e^{2} g^{2} n \,x^{2} \ln \left (g x +f \right )-2 b \,e^{2} g^{2} n \,x^{2} \ln \left (-e x -d \right )-4 b d e f g \ln \relax (c )}{4 \left (g x +f \right )^{2} \left (d g -e f \right )^{2} g} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*(e*x+d)^n)+a)/(g*x+f)^3,x)

[Out]

-1/2*b/g/(g*x+f)^2*ln((e*x+d)^n)-1/4*(2*I*Pi*b*d*e*f*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+2*a*d^2
*g^2+2*ln(c)*b*d^2*g^2+2*ln(c)*b*e^2*f^2+2*b*d*e*f*n*g+2*b*d*e*g^2*n*x-2*b*e^2*f*g*n*x+2*a*e^2*f^2-2*b*e^2*f^2
*n-2*I*Pi*b*d*e*f*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2-4*a*d*e*f*g+2*I*Pi*b*d*e*f*g*csgn(I*c*(e*x+d)^n)^3
-I*Pi*b*e^2*f^2*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+4*ln(g*x+f)*b*e^2*f*g*n*x-4*ln(-e*x-d)*b*e^2*f
*g*n*x+I*Pi*b*e^2*f^2*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*d^2*g^2*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I
*Pi*b*d^2*g^2*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*Pi*b*d^2*g^2*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d
)^n)^2+I*Pi*b*e^2*f^2*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2+2*ln(g*x+f)*b*e^2*f^2*n-2*ln(-e*x-d)*b*e^2*f^2*n-2*I*Pi*
b*d*e*f*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*Pi*b*d^2*g^2*csgn(I*c*(e*x+d)^n)^3-I*Pi*b*e^2*f^2*csgn(I*c*(e*x+d)
^n)^3+2*ln(g*x+f)*b*e^2*g^2*n*x^2-2*ln(-e*x-d)*b*e^2*g^2*n*x^2-4*ln(c)*b*d*e*f*g)/(g*x+f)^2/(d*g-e*f)^2/g

________________________________________________________________________________________

maxima [A]  time = 1.03, size = 167, normalized size = 1.49 \[ \frac {1}{2} \, b e n {\left (\frac {e \log \left (e x + d\right )}{e^{2} f^{2} g - 2 \, d e f g^{2} + d^{2} g^{3}} - \frac {e \log \left (g x + f\right )}{e^{2} f^{2} g - 2 \, d e f g^{2} + d^{2} g^{3}} + \frac {1}{e f^{2} g - d f g^{2} + {\left (e f g^{2} - d g^{3}\right )} x}\right )} - \frac {b \log \left ({\left (e x + d\right )}^{n} c\right )}{2 \, {\left (g^{3} x^{2} + 2 \, f g^{2} x + f^{2} g\right )}} - \frac {a}{2 \, {\left (g^{3} x^{2} + 2 \, f g^{2} x + f^{2} g\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^3,x, algorithm="maxima")

[Out]

1/2*b*e*n*(e*log(e*x + d)/(e^2*f^2*g - 2*d*e*f*g^2 + d^2*g^3) - e*log(g*x + f)/(e^2*f^2*g - 2*d*e*f*g^2 + d^2*
g^3) + 1/(e*f^2*g - d*f*g^2 + (e*f*g^2 - d*g^3)*x)) - 1/2*b*log((e*x + d)^n*c)/(g^3*x^2 + 2*f*g^2*x + f^2*g) -
 1/2*a/(g^3*x^2 + 2*f*g^2*x + f^2*g)

________________________________________________________________________________________

mupad [B]  time = 0.67, size = 173, normalized size = 1.54 \[ \frac {b\,e^2\,n\,\mathrm {atanh}\left (\frac {2\,d^2\,g^3-2\,e^2\,f^2\,g}{2\,g\,{\left (d\,g-e\,f\right )}^2}+\frac {2\,e\,g\,x}{d\,g-e\,f}\right )}{g\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{2\,g\,\left (f^2+2\,f\,g\,x+g^2\,x^2\right )}-\frac {\frac {a\,d\,g-a\,e\,f+b\,e\,f\,n}{d\,g-e\,f}+\frac {b\,e\,g\,n\,x}{d\,g-e\,f}}{2\,f^2\,g+4\,f\,g^2\,x+2\,g^3\,x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d + e*x)^n))/(f + g*x)^3,x)

[Out]

(b*e^2*n*atanh((2*d^2*g^3 - 2*e^2*f^2*g)/(2*g*(d*g - e*f)^2) + (2*e*g*x)/(d*g - e*f)))/(g*(d*g - e*f)^2) - (b*
log(c*(d + e*x)^n))/(2*g*(f^2 + g^2*x^2 + 2*f*g*x)) - ((a*d*g - a*e*f + b*e*f*n)/(d*g - e*f) + (b*e*g*n*x)/(d*
g - e*f))/(2*f^2*g + 2*g^3*x^2 + 4*f*g^2*x)

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(g*x+f)**3,x)

[Out]

Exception raised: NotImplementedError

________________________________________________________________________________________